package com.spatio.serving.basic.service.template.core.component.invoker.config;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.context.annotation.PropertySource;
import org.springframework.context.annotation.PropertySources;

/**
 * @author lei.zhao
 */
@ConfigurationProperties(prefix = "spatio.invoke")
@PropertySources({
        @PropertySource(value = "classpath:application.yml"),
        @PropertySource(value = "classpath:application.properties")}
)
@Data
@Slf4j
public class InvokeProperties {

    @NestedConfigurationProperty
    private IdGen idGen;

    @NestedConfigurationProperty
    private AssetInfo assetInfo;

    @NestedConfigurationProperty
    private GoodsInfo goodsInfo;

    @NestedConfigurationProperty
    private DifyInfo difyInfo;

    @NestedConfigurationProperty
    private Coins coins;

    @NestedConfigurationProperty
    private RcDecision rcDecision;

    @NestedConfigurationProperty
    private Bonergy bonergy;

    @NestedConfigurationProperty
    private Oss oss;


    @Data
    public static class IdGen {
        private String url;
        private String partner;
        private String key;
        private String batchCount;
        private String customId;
    }

    @Data
    public static class DifyInfo {
        private String chatMessage;

        private String audio2Text;

        private String text2Audio;
    }

    @Data
    public static class GoodsInfo {
        private String getByGoodsId;
        private String bagRemainLimit;
        private String bagCampon;
        private String bagConfirm;
        private String bagCancel;
        private String check;
    }

    @Data
    public static class AssetInfo {
        private String getByAssetId;
    }

    @Data
    public static class Coins{
        private String confirm;

        private String cancel;

        private String campOn;

        private String getWalletList;

        private String getWalletDetail;
    }

    @Data
    public static class RcDecision{
        private String decision;
    }

    @Data
    public static class Bonergy {
        private String consumeCampOn;
        private String consumeCancel;
        private String consumeConfirm;
        private String pendingCampOn;
        private String pendingCancel;
        private String pendingConfirm;
        private String userInfo;
    }

    @Data
    public static class Oss {
        private String completeUrl;
    }

}
